<template>
    <div>
        <h2>
            轮播管理
        </h2>
        <div>
            <el-table :data="tableData" height="450" style="width: 100%">
                <el-table-column prop="id" label="序号" width="150" />
                <el-table-column prop="bannerImg" label="轮播" width="550" />
                <el-table-column label="操作" width="200">
                    <template #default="scope" >
                        <el-button size="small">添加</el-button>
                        <el-button size="small" type="danger" >删除
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script setup lang="ts">
import { Banner } from "@/api/index";
import { ref } from 'vue'
// 获取轮播图片数据// 渲染
const tableData=ref()
const getBanner = async () => {
    let res = await Banner()
    console.log(res.data);
    let { Code, data } = res.data
    if (Code == 1) {
        tableData.value = data
        console.log(tableData.value);
    }
}
getBanner()


</script>